﻿using System;

namespace diantou.web.exam
{
    /// <summary>
    /// 答卷
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class report : view<report>
    {
        /// <summary>
        /// 用户提交记录
        /// </summary>
        private diantou.examDataAccess.examJudge.judgeSimilarity[] judges
        {
            get { return diantou.examDataAccess.tcpCall.examJudge.getJudges(user.Id, false); }
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        private bool loadView(int userId)
        {
            if (base.user != null)
            {
                exam = diantou.examDataAccess.clientCache.Exam[examUser.ExamId];
                if (exam.Type == dataModel.exam.type.考生熟悉环境的测试赛) return true;
            }
            if (userId != 0)
            {
                diantou.examDataAccess.examUser user = diantou.examDataAccess.clientCache.ExamUser[userId];
                if (user != null)
                {
                    location(new diantou.dataModel.path.exam { Id = user.ExamId }.Index);
                    return false;
                }
            }
            AjaxResponse(webConfig.NotFound404);
            return false;
        }
    }
}
